package encapsulator;

import java.lang.reflect.Method;

import exceptions.InvalidParameterException;

public class MethodObjectContainer {

	private Method method;
	private Object object;

	public MethodObjectContainer(Method method, Object object) throws InvalidParameterException {

		setMethod(method);
		setObject(object);

	}

	public Method getMethod() {
		return method;
	}

	public void setMethod(Method method) throws InvalidParameterException {
		if (method != null) {
			this.method = method;
		}else{
			throw new InvalidParameterException();
		}
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) throws InvalidParameterException {
		if (object != null)
			this.object = object;
		else{
			throw new InvalidParameterException();
		}
	}

}
